<template>
  <div class="api-content">
    <Icon type="arrow-right-b"></Icon>&nbsp;
    <span>城市天气预报</span>
    <div class="curl">
      <Tag color="blue">接口说明</Tag>
      <span>根据城市编码查询指定城市7天天气预报和生活指数</span>
    </div>
    <div class="curl">
      <Tag color="green">GET</Tag>
      <span>/v2/weatherforecast/{accesskey}/{citycode}</span>
    </div>
    <Collapse id="collapse">
      <Panel>
        参数详情
        <p slot="content">
          <ParameterDetails :columns="columns1" :data="data1" :columnss="columns2" :datas="data2"></ParameterDetails>
        </p>
      </Panel>
    </Collapse>
  </div>
</template>

<script>
  import ParameterDetails from "../ParameterDetails.vue"
  export default {
    components: {
      ParameterDetails,
    },
    data() {
      return {
        columns1: [{
            title: "参数名称",
            key: "req"
          },
          {
            title: "类型",
            key: "cat"
          },
          {
            title: "参数含义",
            key: "mean"
          }
        ],
        data1: [{
            req: "accesskey",
            cat: "必填",
            mean: "用户私钥"
          },
          {
            req: "citycodes",
            cat: "必填",
            mean: "请求的城市编号列表，最多支持50个城市"
          }
        ],
        columns2: [{
            title: "参数名称",
            key: "req"
          },
          {
            title: "类型",
            key: "cat"
          },
          {
            title: "参数含义",
            key: "mean"
          }
        ],
        data2: [{
            req: "rcode",
            cat: "Int",
            mean: "结果码"
          },
          {
            req: "rdesc",
            cat: "String",
            mean: "结果描述"
          },
          {
            req: "citycode",
            cat: "String",
            mean: "城市编码"
          },
          {
            req: "rdesc",
            cat: "String",
            mean: "结果描述"
          },
          {
            req: "rdesc",
            cat: "String",
            mean: "结果描述"
          },
          {
            req: "rdesc",
            cat: "String",
            mean: "结果描述"
          },
          {
            req: "rdesc",
            cat: "String",
            mean: "结果描述"
          }
        ],
      }
    }

  }

</script>
